package net.peihuan.service.impl;

import net.peihuan.dao.ArticleTagMapper;
import net.peihuan.entity.ArticleTag;
import net.peihuan.service.ArticleTagService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class ArticleTagServiceImpl implements ArticleTagService {

    @Resource
    private ArticleTagMapper articleTagMapper;

    @Override
    public int save(ArticleTag articletag) {
        return articleTagMapper.insert(articletag);
    }

    @Override
    public int deleteByArticleId(int id) {
        return articleTagMapper.deleteByArticleId(id);
    }
}
